cmake_minimum_required(VERSION 3.8)
project(yaokong)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()
include_directories(
  include
  ${Boost_INCLUDE_DIRS}
)
# find dependencies
aux_source_directory(src SRC_LISTS)
# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(nav_msgs REQUIRED)
# uncomment the following section in order to fill in
# further dependencies manually.
# find_package(<dependency> REQUIRED)


find_package(PkgConfig REQUIRED)
pkg_check_modules(JSONCPP jsoncpp)
include_directories(${JSONCPP_LIBRARIES})

add_executable(yaokong ${SRC_LISTS} ../e_wheel/src/data_type_define.cpp)
target_link_libraries(yaokong 
${rclcpp_LIBRARIES}
${JSONCPP_LIBRARIES}
)

ament_target_dependencies(yaokong rclcpp std_msgs nav_msgs)
install(TARGETS
yaokong

  DESTINATION lib/${PROJECT_NAME})
  install(DIRECTORY launch
  DESTINATION share/${PROJECT_NAME}
)
ament_package()
